From 431545877e71f00cb69e423a45f465d138ed0a8b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 1 May 2020 12:12:18 -0400 Subject: [PATCH] docs: Add more detail to the drawing overview --- docs/reference/gtk/drawing-model.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/reference/gtk/drawing-model.xml b/docs/reference/gtk/drawing-model.xml index 27cf247aef..88b10df78a 100644 --- a/docs/reference/gtk/drawing-model.xml +++ b/docs/reference/gtk/drawing-model.xml @@ -206,11 +206,17 @@ During the Paint phase GTK receives a single #GdkSurface::render signal on the toplevel surface. The signal handler will create a snapshot object (which is a helper for creating a scene graph) and call the - #GtkWidget::snapshot() vfunc, which will propagate down the widget hierarchy. + #GtkWidget::snapshot() vfunc, which will propagate down the widget hierarchy. This lets each widget snapshot its content at the right place and time, correctly handling things like partial transparencies and overlapping widgets. + + During the snapshotting of each widget, GTK automatically handles the CSS + rendering according to the CSS box model. It snapshots first the background, + then the border, then the widget content itself, and finally the outline. + + To avoid excessive work when generating scene graphs, GTK caches render nodes. Each widget keeps a reference to its render node (which in turn, will refer to -- 2.30.2